package net.junaoki.action;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.ParentPackage;

import com.opensymphony.xwork2.ActionSupport;

// @Namespace("/User")
@ParentPackage("json-default")
public class AjaxJsonCallAction extends ActionSupport {
    private static final long serialVersionUID = 6440964115723859324L;

    @Override
    @Action(value="CallJsonAjax", results = {
            @Result(name = SUCCESS
            		, type = "json"
//            	, params = {
//	                "includeProperties", "string1" 
//                }
		    )
	    }
    )
    public String execute() throws Exception {
        resultList = new ArrayList<String>();
        resultList.add("aaaa");
        resultList.add("bbb");
        resultList.add("ccc");
        return SUCCESS;
    }
    
    private List<String> resultList;
    public void setResultList(List<String> resultList) {
        this.resultList = resultList;
    }

    public List<String> getResultList() {
        return resultList;
    }


}
